package cn.gov.nanhai.commonssys.web.pojo.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ${董荣盛}
 * @创建时间 2021/4/18
 * Description: 创建任务接口 参数对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="创建任务所需参数类")
public class CreationTaskDTO implements Serializable {
    /**
     *@ApiModelProperty()用于方法，字段； 表示对model属性的说明或者数据操作更改
     * value–字段说明
     * name–重写属性名字
     * dataType–重写属性类型
     * required–是否必填
     * example–举例说明
     * hidden–隐藏
     *
     * 因为参数可能不断变化，所以包装成一个请求对象
     */

    @ApiModelProperty(value="任务名称",required = true)
    private String taskName;

    @ApiModelProperty(value="采集开始时间",required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date collectStartTime;

    @ApiModelProperty(value="采集结束时间",required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date collectEndTime;

    @ApiModelProperty(value="采集区域(镇)",required = true)
    private Long collectTaskTownId;

    @ApiModelProperty(value="采集区域(村)",required = true)
    private Long collectTaskVillageId;

    @ApiModelProperty(value="采集要求",required = true)
    private String collectRequested;

    @ApiModelProperty(value="通知/图片(url)",required = true)
    private String accessorySite;

    @ApiModelProperty(value = "计划状态")
    private String planStatus;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    @ApiModelProperty(value = "创建人")
    private String createPerson;

    @ApiModelProperty(value = "更新人")
    private String updatePerson;

    @Override
    public String toString() {
        return "CreationTaskDTO{" +
                "taskName='" + taskName + '\'' +
                ", collectStartTime=" + collectStartTime +
                ", collectEndTime=" + collectEndTime +
                ", collectTaskTownId=" + collectTaskTownId +
                ", collectTaskVillageId=" + collectTaskVillageId +
                ", collectRequested='" + collectRequested + '\'' +
                ", accessorySite='" + accessorySite + '\'' +
                ", planStatus=" + planStatus +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", createPerson='" + createPerson + '\'' +
                ", updatePerson='" + updatePerson + '\'' +
                '}';
    }
}
